home *** CD-ROM | disk | FTP | other *** search
Unknown | 1998-10-19 | 3.9 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 23 69 66 6e 64 65 66 20 | 6c 69 6e 74 20 2a 62 3b |#ifndef |lint *b;|
|00000010| 0a 7b 0a 20 08 00 09 92 | 08 00 09 8e 53 69 64 20 |.{. ....|....Sid |
|00000020| 3d 20 22 24 49 64 3a 20 | 64 6f 63 32 68 6c 70 2e |= "$Id: |doc2hlp.|
|00000030| 63 2c 76 20 31 2e 37 20 | 31 39 39 38 2f 31 30 2f |c,v 1.7 |1998/10/|
|00000040| 31 39 20 31 33 3a 31 37 | 3a 33 32 20 6c 68 65 63 |19 13:17|:32 lhec|
|00000050| 6b 69 6e 67 20 45 78 70 | 20 24 22 3b 0a 23 65 6e |king Exp| $";.#en|
|00000060| 64 69 66 0a 0a 2f 2a 20 | 47 4e 55 50 4c 4f 54 20 |dif../* |GNUPLOT |
|00000070| 2d 20 64 6f 63 32 68 6c | 70 2e 63 20 2a 2f 0a 0a |- doc2hl|p.c */..|
|00000080| 2f 2a 5b 0a 20 2a 20 43 | 6f 70 79 72 69 67 68 74 |/*[. * C|opyright|
|00000090| 20 31 39 38 36 20 2d 20 | 31 39 39 33 2c 20 31 39 | 1986 - |1993, 19|
|000000a0| 39 38 20 20 20 54 68 6f | 6d 61 73 20 57 69 6c 6c |98 Tho|mas Will|
|000000b0| 69 61 6d 73 2c 20 43 6f | 6c 69 6e 20 4b 65 6c 6c |iams, Co|lin Kell|
|000000c0| 65 79 0a 20 2a 0a 20 2a | 20 50 65 72 6d 69 73 73 |ey. *. *| Permiss|
|000000d0| 69 6f 6e 20 74 6f 20 75 | 73 65 2c 20 63 6f 70 79 |ion to u|se, copy|
|000000e0| 2c 20 61 6e 64 20 64 69 | 73 74 72 69 62 75 74 65 |, and di|stribute|
|000000f0| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 20 61 | this so|ftware a|
|00000100| 6e 64 20 69 74 73 0a 20 | 2a 20 64 6f 63 75 6d 65 |nd its. |* docume|
|00000110| 6e 74 61 74 69 6f 6e 20 | 66 6f 72 20 61 6e 79 20 |ntation |for any |
|00000120| 70 75 72 70 6f 73 65 20 | 77 69 74 68 20 6f 72 20 |purpose |with or |
|00000130| 77 69 74 68 6f 75 74 20 | 66 65 65 20 69 73 20 68 |without |fee is h|
|00000140| 65 72 65 62 79 20 67 72 | 61 6e 74 65 64 2c 0a 20 |ereby gr|anted,. |
|00000150| 2a 20 70 72 6f 76 69 64 | 65 64 20 74 68 61 74 20 |* provid|ed that |
|00000160| 74 68 65 20 61 62 6f 76 | 65 20 63 6f 70 79 72 69 |the abov|e copyri|
|00000170| 67 68 74 20 6e 6f 74 69 | 63 65 20 61 70 70 65 61 |ght noti|ce appea|
|00000180| 72 20 69 6e 20 61 6c 6c | 20 63 6f 70 69 65 73 20 |r in all| copies |
|00000190| 61 6e 64 0a 20 2a 20 74 | 68 61 74 20 62 6f 74 68 |and. * t|hat both|
|000001a0| 20 74 68 61 74 20 63 6f | 70 79 72 69 67 68 74 20 | that co|pyright |
|000001b0| 6e 6f 74 69 63 65 20 61 | 6e 64 20 74 68 69 73 20 |notice a|nd this |
|000001c0| 70 65 72 6d 69 73 73 69 | 6f 6e 20 6e 6f 74 69 63 |permissi|on notic|
|000001d0| 65 20 61 70 70 65 61 72 | 0a 20 2a 20 69 6e 20 73 |e appear|. * in s|
|000001e0| 75 70 70 6f 72 74 69 6e | 67 20 64 6f 63 75 6d 65 |upportin|g docume|
|000001f0| 6e 74 61 74 69 6f 6e 2e | 0a 20 2a 0a 20 2a 20 50 |ntation.|. *. * P|
|00000200| 65 72 6d 69 73 73 69 6f | 6e 20 74 6f 20 6d 6f 64 |ermissio|n to mod|
|00000210| 69 66 79 20 74 68 65 20 | 73 6f 66 74 77 61 72 65 |ify the |software|
|00000220| 20 69 73 20 67 72 61 6e | 74 65 64 2c 20 62 75 74 | is gran|ted, but|
|00000230| 20 6e 6f 74 20 74 68 65 | 20 72 69 67 68 74 20 74 | not the| right t|
|00000240| 6f 0a 20 2a 20 64 69 73 | 74 72 69 62 75 74 65 20 |o. * dis|tribute |
|00000250| 74 68 65 20 63 6f 6d 70 | 6c 65 74 65 20 6d 6f 64 |the comp|lete mod|
|00000260| 69 66 69 65 64 20 73 6f | 75 72 63 65 20 63 6f 64 |ified so|urce cod|
|00000270| 65 2e 20 20 4d 6f 64 69 | 66 69 63 61 74 69 6f 6e |e. Modi|fication|
|00000280| 73 20 61 72 65 20 74 6f | 0a 20 2a 20 62 65 20 64 |s are to|. * be d|
|00000290| 69 73 74 72 69 62 75 74 | 65 64 20 61 73 20 70 61 |istribut|ed as pa|
|000002a0| 74 63 68 65 73 20 74 6f | 20 74 68 65 20 72 65 6c |tches to| the rel|
|000002b0| 65 61 73 65 64 20 76 65 | 72 73 69 6f 6e 2e 20 20 |eased ve|rsion. |
|000002c0| 50 65 72 6d 69 73 73 69 | 6f 6e 20 74 6f 0a 20 2a |Permissi|on to. *|
|000002d0| 20 64 69 73 74 72 69 62 | 75 74 65 20 62 69 6e 61 | distrib|ute bina|
|000002e0| 72 69 65 73 20 70 72 6f | 64 75 63 65 64 20 62 79 |ries pro|duced by|
|000002f0| 20 63 6f 6d 70 69 6c 69 | 6e 67 20 6d 6f 64 69 66 | compili|ng modif|
|00000300| 69 65 64 20 73 6f 75 72 | 63 65 73 20 69 73 20 67 |ied sour|ces is g|
|00000310| 72 61 6e 74 65 64 2c 0a | 20 2a 20 70 72 6f 76 69 |ranted,.| * provi|
|00000320| 64 65 64 20 79 6f 75 0a | 20 2a 20 20 20 31 2e 20 |ded you.| * 1. |
|00000330| 64 69 73 74 72 69 62 75 | 74 65 20 74 68 65 20 63 |distribu|te the c|
|00000340| 6f 72 72 65 73 70 6f 6e | 64 69 6e 67 20 73 6f 75 |orrespon|ding sou|
|00000350| 72 63 65 20 6d 6f 64 69 | 66 69 63 61 74 69 6f 6e |rce modi|fication|
|00000360| 73 20 66 72 6f 6d 20 74 | 68 65 0a 20 2a 20 20 20 |s from t|he. * |
|00000370| 20 72 65 6c 65 61 73 65 | 64 20 76 65 72 73 69 6f | release|d versio|
|00000380| 6e 20 69 6e 20 74 68 65 | 20 66 6f 72 6d 20 6f 66 |n in the| form of|
|00000390| 20 61 20 70 61 74 63 68 | 20 66 69 6c 65 20 61 6c | a patch| file al|
|000003a0| 6f 6e 67 20 77 69 74 68 | 20 74 68 65 20 62 69 6e |ong with| the bin|
|000003b0| 61 72 69 65 73 2c 0a 20 | 2a 20 20 20 32 2e 20 61 |aries,. |* 2. a|
|000003c0| 64 64 20 73 70 65 63 69 | 61 6c 20 76 65 72 73 69 |dd speci|al versi|
|000003d0| 6f 6e 20 69 64 65 6e 74 | 69 66 69 63 61 74 69 6f |on ident|ificatio|
|000003e0| 6e 20 74 6f 20 64 69 73 | 74 69 6e 67 75 69 73 68 |n to dis|tinguish|
|000003f0| 20 79 6f 75 72 20 76 65 | 72 73 69 6f 6e 0a 20 2a | your ve|rsion. *|
|00000400| 20 20 20 20 69 6e 20 61 | 64 64 69 74 69 6f 6e 20 | in a|ddition |
|00000410| 74 6f 20 74 68 65 20 62 | 61 73 65 20 72 65 6c 65 |to the b|ase rele|
|00000420| 61 73 65 20 76 65 72 73 | 69 6f 6e 20 6e 75 6d 62 |ase vers|ion numb|
|00000430| 65 72 2c 0a 20 2a 20 20 | 20 33 2e 20 70 72 6f 76 |er,. * | 3. prov|
|00000440| 69 64 65 20 79 6f 75 72 | 20 6e 61 6d 65 20 61 6e |ide your| name an|
|00000450| 64 20 61 64 64 72 65 73 | 73 20 61 73 20 74 68 65 |d addres|s as the|
|00000460| 20 70 72 69 6d 61 72 79 | 20 63 6f 6e 74 61 63 74 | primary| contact|
|00000470| 20 66 6f 72 20 74 68 65 | 0a 20 2a 20 20 20 20 73 | for the|. * s|
|00000480| 75 70 70 6f 72 74 20 6f | 66 20 79 6f 75 72 20 6d |upport o|f your m|
|00000490| 6f 64 69 66 69 65 64 20 | 76 65 72 73 69 6f 6e 2c |odified |version,|
|000004a0| 20 61 6e 64 0a 20 2a 20 | 20 20 34 2e 20 72 65 74 | and. * | 4. ret|
|000004b0| 61 69 6e 20 6f 75 72 20 | 63 6f 6e 74 61 63 74 20 |ain our |contact |
|000004c0| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 69 6e 20 72 |informat|ion in r|
|000004d0| 65 67 61 72 64 20 74 6f | 20 75 73 65 20 6f 66 20 |egard to| use of |
|000004e0| 74 68 65 20 62 61 73 65 | 0a 20 2a 20 20 20 20 73 |the base|. * s|
|000004f0| 6f 66 74 77 61 72 65 2e | 0a 20 2a 20 50 65 72 6d |oftware.|. * Perm|
|00000500| 69 73 73 69 6f 6e 20 74 | 6f 20 64 69 73 74 72 69 |ission t|o distri|
|00000510| 62 75 74 65 20 74 68 65 | 20 72 65 6c 65 61 73 65 |bute the| release|
|00000520| 64 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 68 65 |d versio|n of the|
|00000530| 20 73 6f 75 72 63 65 20 | 63 6f 64 65 20 61 6c 6f | source |code alo|
|00000540| 6e 67 0a 20 2a 20 77 69 | 74 68 20 63 6f 72 72 65 |ng. * wi|th corre|
|00000550| 73 70 6f 6e 64 69 6e 67 | 20 73 6f 75 72 63 65 20 |sponding| source |
|00000560| 6d 6f 64 69 66 69 63 61 | 74 69 6f 6e 73 20 69 6e |modifica|tions in|
|00000570| 20 74 68 65 20 66 6f 72 | 6d 20 6f 66 20 61 20 70 | the for|m of a p|
|00000580| 61 74 63 68 20 66 69 6c | 65 20 69 73 0a 20 2a 20 |atch fil|e is. * |
|00000590| 67 72 61 6e 74 65 64 20 | 77 69 74 68 20 73 61 6d |granted |with sam|
|000005a0| 65 20 70 72 6f 76 69 73 | 69 6f 6e 73 20 32 20 74 |e provis|ions 2 t|
|000005b0| 68 72 6f 75 67 68 20 34 | 20 66 6f 72 20 62 69 6e |hrough 4| for bin|
|000005c0| 61 72 79 20 64 69 73 74 | 72 69 62 75 74 69 6f 6e |ary dist|ribution|
|000005d0| 73 2e 0a 20 2a 0a 20 2a | 20 54 68 69 73 20 73 6f |s.. *. *| This so|
|000005e0| 66 74 77 61 72 65 20 69 | 73 20 70 72 6f 76 69 64 |ftware i|s provid|
|000005f0| 65 64 20 22 61 73 20 69 | 73 22 20 77 69 74 68 6f |ed "as i|s" witho|
|00000600| 75 74 20 65 78 70 72 65 | 73 73 20 6f 72 20 69 6d |ut expre|ss or im|
|00000610| 70 6c 69 65 64 20 77 61 | 72 72 61 6e 74 79 0a 20 |plied wa|rranty. |
|00000620| 2a 20 74 6f 20 74 68 65 | 20 65 78 74 65 6e 74 20 |* to the| extent |
|00000630| 70 65 72 6d 69 74 74 65 | 64 20 62 79 20 61 70 70 |permitte|d by app|
|00000640| 6c 69 63 61 62 6c 65 20 | 6c 61 77 2e 0a 5d 2a 2f |licable |law..]*/|
|00000650| 0a 0a 2f 2a 0a 20 2a 20 | 64 6f 63 32 68 6c 70 2e |../*. * |doc2hlp.|
|00000660| 63 20 20 2d 2d 20 70 72 | 6f 67 72 61 6d 20 74 6f |c -- pr|ogram to|
|00000670| 20 63 6f 6e 76 65 72 74 | 20 47 6e 75 70 6c 6f 74 | convert| Gnuplot|
|00000680| 20 2e 44 4f 43 20 66 6f | 72 6d 61 74 20 74 6f 20 | .DOC fo|rmat to |
|00000690| 0a 20 2a 20 56 4d 53 20 | 68 65 6c 70 20 28 2e 48 |. * VMS |help (.H|
|000006a0| 4c 50 29 20 66 6f 72 6d | 61 74 2e 0a 20 2a 0a 20 |LP) form|at.. *. |
|000006b0| 2a 20 54 68 69 73 20 69 | 6e 76 6f 6c 76 65 73 20 |* This i|nvolves |
|000006c0| 73 74 72 69 70 70 69 6e | 67 20 61 6c 6c 20 6c 69 |strippin|g all li|
|000006d0| 6e 65 73 20 77 69 74 68 | 20 61 20 6c 65 61 64 69 |nes with| a leadi|
|000006e0| 6e 67 20 3f 2c 0a 20 2a | 20 40 2c 20 23 2c 20 6f |ng ?,. *| @, #, o|
|000006f0| 72 20 25 2e 0a 20 2a 20 | 4d 6f 64 69 66 69 65 64 |r %.. * |Modified|
|00000700| 20 62 79 20 52 75 73 73 | 65 6c 6c 20 4c 61 6e 67 | by Russ|ell Lang|
|00000710| 20 66 72 6f 6d 20 68 6c | 70 32 6d 73 2e 63 20 62 | from hl|p2ms.c b|
|00000720| 79 20 54 68 6f 6d 61 73 | 20 57 69 6c 6c 69 61 6d |y Thomas| William|
|00000730| 73 20 0a 20 2a 0a 20 2a | 20 75 73 61 67 65 3a 20 |s . *. *| usage: |
|00000740| 20 64 6f 63 32 68 6c 70 | 20 5b 66 69 6c 65 2e 64 | doc2hlp| [file.d|
|00000750| 6f 63 20 5b 66 69 6c 65 | 2e 68 6c 70 5d 5d 0a 20 |oc [file|.hlp]]. |
|00000760| 2a 0a 20 2a 20 4f 72 69 | 67 69 6e 61 6c 20 76 65 |*. * Ori|ginal ve|
|00000770| 72 73 69 6f 6e 20 62 79 | 20 44 61 76 69 64 20 4b |rsion by| David K|
|00000780| 6f 74 7a 20 75 73 65 64 | 20 74 68 65 20 66 6f 6c |otz used| the fol|
|00000790| 6c 6f 77 69 6e 67 20 6f | 6e 65 20 6c 69 6e 65 20 |lowing o|ne line |
|000007a0| 73 63 72 69 70 74 21 0a | 20 2a 20 73 65 64 20 27 |script!.| * sed '|
|000007b0| 2f 5e 5b 3f 40 23 25 5d | 2f 64 27 20 66 69 6c 65 |/^[?@#%]|/d' file|
|000007c0| 2e 64 6f 63 20 3e 20 66 | 69 6c 65 2e 68 6c 70 0a |.doc > f|ile.hlp.|
|000007d0| 20 2a 2f 0a 0a 23 69 66 | 64 65 66 20 48 41 56 45 | */..#if|def HAVE|
|000007e0| 5f 43 4f 4e 46 49 47 5f | 48 0a 23 69 6e 63 6c 75 |_CONFIG_|H.#inclu|
|000007f0| 64 65 20 22 63 6f 6e 66 | 69 67 2e 68 22 0a 23 65 |de "conf|ig.h".#e|
|00000800| 6e 64 69 66 0a 0a 23 69 | 6e 63 6c 75 64 65 20 22 |ndif..#i|nclude "|
|00000810| 61 6e 73 69 63 68 65 6b | 2e 68 22 0a 23 69 6e 63 |ansichek|.h".#inc|
|00000820| 6c 75 64 65 20 22 73 74 | 64 66 6e 2e 68 22 0a 23 |lude "st|dfn.h".#|
|00000830| 69 6e 63 6c 75 64 65 20 | 22 64 6f 63 32 78 2e 68 |include |"doc2x.h|
|00000840| 22 0a 0a 65 78 74 65 72 | 6e 20 62 6f 6f 6c 65 61 |"..exter|n boolea|
|00000850| 6e 20 73 69 6e 67 6c 65 | 5f 74 6f 70 5f 6c 65 76 |n single|_top_lev|
|00000860| 65 6c 3b 0a 0a 76 6f 69 | 64 20 63 6f 6e 76 65 72 |el;..voi|d conver|
|00000870| 74 20 5f 5f 50 52 4f 54 | 4f 28 28 46 49 4c 45 20 |t __PROT|O((FILE |
|00000880| 2a 2c 20 46 49 4c 45 20 | 2a 29 29 3b 0a 76 6f 69 |*, FILE |*));.voi|
|00000890| 64 20 70 72 6f 63 65 73 | 73 5f 6c 69 6e 65 20 5f |d proces|s_line _|
|000008a0| 5f 50 52 4f 54 4f 28 28 | 63 68 61 72 20 2a 2c 20 |_PROTO((|char *, |
|000008b0| 46 49 4c 45 20 2a 29 29 | 3b 0a 0a 69 6e 74 20 6d |FILE *))|;..int m|
|000008c0| 61 69 6e 28 61 72 67 63 | 2c 20 61 72 67 76 29 0a |ain(argc|, argv).|
|000008d0| 69 6e 74 20 61 72 67 63 | 3b 0a 63 68 61 72 20 2a |int argc|;.char *|
|000008e0| 2a 61 72 67 76 3b 0a 7b | 0a 20 20 20 20 46 49 4c |*argv;.{|. FIL|
|000008f0| 45 20 2a 69 6e 66 69 6c | 65 3b 0a 20 20 20 20 46 |E *infil|e;. F|
|00000900| 49 4c 45 20 2a 6f 75 74 | 66 69 6c 65 3b 0a 0a 20 |ILE *out|file;.. |
|00000910| 20 20 20 69 6e 66 69 6c | 65 20 3d 20 73 74 64 69 | infil|e = stdi|
|00000920| 6e 3b 0a 20 20 20 20 6f | 75 74 66 69 6c 65 20 3d |n;. o|utfile =|
|00000930| 20 73 74 64 6f 75 74 3b | 0a 0a 20 20 20 20 73 69 | stdout;|.. si|
|00000940| 6e 67 6c 65 5f 74 6f 70 | 5f 6c 65 76 65 6c 20 3d |ngle_top|_level =|
|00000950| 20 54 52 55 45 3b 0a 0a | 20 20 20 20 69 66 20 28 | TRUE;..| if (|
|00000960| 61 72 67 63 20 3e 20 33 | 29 20 7b 0a 09 66 70 72 |argc > 3|) {..fpr|
|00000970| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 20 22 55 73 |intf(std|err, "Us|
|00000980| 61 67 65 3a 20 25 73 20 | 5b 69 6e 66 69 6c 65 20 |age: %s |[infile |
|00000990| 5b 6f 75 74 66 69 6c 65 | 5d 5d 5c 6e 22 2c 20 61 |[outfile|]]\n", a|
|000009a0| 72 67 76 5b 30 5d 29 3b | 0a 09 65 78 69 74 28 45 |rgv[0]);|..exit(E|
|000009b0| 58 49 54 5f 46 41 49 4c | 55 52 45 29 3b 0a 20 20 |XIT_FAIL|URE);. |
|000009c0| 20 20 7d 0a 20 20 20 20 | 69 66 20 28 61 72 67 63 | }. |if (argc|
|000009d0| 20 3e 3d 20 32 29 20 7b | 0a 09 69 66 20 28 28 69 | >= 2) {|..if ((i|
|000009e0| 6e 66 69 6c 65 20 3d 20 | 66 6f 70 65 6e 28 61 72 |nfile = |fopen(ar|
|000009f0| 67 76 5b 31 5d 2c 20 22 | 72 22 29 29 20 3d 3d 20 |gv[1], "|r")) == |
|00000a00| 28 46 49 4c 45 20 2a 29 | 20 4e 55 4c 4c 29 20 7b |(FILE *)| NULL) {|
|00000a10| 0a 09 20 20 20 20 66 70 | 72 69 6e 74 66 28 73 74 |.. fp|rintf(st|
|00000a20| 64 65 72 72 2c 20 22 25 | 73 3a 20 43 61 6e 27 74 |derr, "%|s: Can't|
|00000a30| 20 6f 70 65 6e 20 25 73 | 20 66 6f 72 20 72 65 61 | open %s| for rea|
|00000a40| 64 69 6e 67 5c 6e 22 2c | 0a 09 09 20 20 20 20 61 |ding\n",|... a|
|00000a50| 72 67 76 5b 30 5d 2c 20 | 61 72 67 76 5b 31 5d 29 |rgv[0], |argv[1])|
|00000a60| 3b 0a 09 20 20 20 20 65 | 78 69 74 28 45 58 49 54 |;.. e|xit(EXIT|
|00000a70| 5f 46 41 49 4c 55 52 45 | 29 3b 0a 09 7d 0a 20 20 |_FAILURE|);..}. |
|00000a80| 20 20 7d 0a 20 20 20 20 | 69 66 20 28 61 72 67 63 | }. |if (argc|
|00000a90| 20 3d 3d 20 33 29 20 7b | 0a 09 69 66 20 28 28 6f | == 3) {|..if ((o|
|00000aa0| 75 74 66 69 6c 65 20 3d | 20 66 6f 70 65 6e 28 61 |utfile =| fopen(a|
|00000ab0| 72 67 76 5b 32 5d 2c 20 | 22 77 22 29 29 20 3d 3d |rgv[2], |"w")) ==|
|00000ac0| 20 28 46 49 4c 45 20 2a | 29 20 4e 55 4c 4c 29 20 | (FILE *|) NULL) |
|00000ad0| 7b 0a 09 20 20 20 20 66 | 70 72 69 6e 74 66 28 73 |{.. f|printf(s|
|00000ae0| 74 64 65 72 72 2c 20 22 | 25 73 3a 20 43 61 6e 27 |tderr, "|%s: Can'|
|00000af0| 74 20 6f 70 65 6e 20 25 | 73 20 66 6f 72 20 77 72 |t open %|s for wr|
|00000b00| 69 74 69 6e 67 5c 6e 22 | 2c 0a 09 09 20 20 20 20 |iting\n"|,... |
|00000b10| 61 72 67 76 5b 30 5d 2c | 20 61 72 67 76 5b 32 5d |argv[0],| argv[2]|
|00000b20| 29 3b 0a 09 20 20 20 20 | 65 78 69 74 28 45 58 49 |);.. |exit(EXI|
|00000b30| 54 5f 46 41 49 4c 55 52 | 45 29 3b 0a 09 7d 0a 20 |T_FAILUR|E);..}. |
|00000b40| 20 20 20 7d 0a 0a 20 20 | 20 20 63 6f 6e 76 65 72 | }.. | conver|
|00000b50| 74 28 69 6e 66 69 6c 65 | 2c 20 6f 75 74 66 69 6c |t(infile|, outfil|
|00000b60| 65 29 3b 0a 0a 20 20 20 | 20 65 78 69 74 28 45 58 |e);.. | exit(EX|
|00000b70| 49 54 5f 53 55 43 43 45 | 53 53 29 3b 0a 7d 0a 0a |IT_SUCCE|SS);.}..|
|00000b80| 0a 76 6f 69 64 20 63 6f | 6e 76 65 72 74 20 28 69 |.void co|nvert (i|
|00000b90| 6e 66 2c 20 6f 75 74 66 | 29 0a 46 49 4c 45 20 2a |nf, outf|).FILE *|
|00000ba0| 69 6e 66 2c 20 2a 6f 75 | 74 66 3b 0a 7b 0a 20 20 |inf, *ou|tf;.{. |
|00000bb0| 20 20 73 74 61 74 69 63 | 20 63 68 61 72 20 6c 69 | static| char li|
|00000bc0| 6e 65 5b 4d 41 58 5f 4c | 49 4e 45 5f 4c 45 4e 2b |ne[MAX_L|INE_LEN+|
|00000bd0| 31 5d 3b 0a 0a 20 20 20 | 20 77 68 69 6c 65 20 28 |1];.. | while (|
|00000be0| 67 65 74 5f 6c 69 6e 65 | 28 6c 69 6e 65 2c 20 73 |get_line|(line, s|
|00000bf0| 69 7a 65 6f 66 28 6c 69 | 6e 65 29 2c 20 69 6e 66 |izeof(li|ne), inf|
|00000c00| 29 29 0a 20 20 20 20 20 | 20 20 20 70 72 6f 63 65 |)). | proce|
|00000c10| 73 73 5f 6c 69 6e 65 28 | 6c 69 6e 65 2c 20 6f 75 |ss_line(|line, ou|
|00000c20| 74 66 29 3b 0a 7d 0a 0a | 0a 76 6f 69 64 20 70 72 |tf);.}..|.void pr|
|00000c30| 6f 63 65 73 73 5f 6c 69 | 6e 65 28 6c 69 6e 65 2c |ocess_li|ne(line,|
|00000c40| 20 62 29 0a 63 68 61 72 | 20 2a 6c 69 6e 65 3b 0a | b).char| *line;.|
|00000c50| 46 49 4c 45 20 2a 62 3b | 0a 7b 0a 20 20 20 20 73 |FILE *b;|.{. s|
|00000c60| 74 61 74 69 63 20 69 6e | 74 20 6c 69 6e 65 5f 63 |tatic in|t line_c|
|00000c70| 6f 75 6e 74 20 3d 20 30 | 3b 0a 0a 20 20 20 20 6c |ount = 0|;.. l|
|00000c80| 69 6e 65 5f 63 6f 75 6e | 74 2b 2b 3b 0a 0a 20 20 |ine_coun|t++;.. |
|00000c90| 20 20 73 77 69 74 63 68 | 20 28 6c 69 6e 65 5b 30 | switch| (line[0|
|00000ca0| 5d 29 20 7b 09 09 2f 2a | 20 63 6f 6e 74 72 6f 6c |]) {../*| control|
|00000cb0| 20 63 68 61 72 61 63 74 | 65 72 20 2a 2f 0a 20 20 | charact|er */. |
|00000cc0| 20 20 63 61 73 65 20 27 | 3f 27 3a 7b 09 09 09 2f | case '|?':{.../|
|00000cd0| 2a 20 69 6e 74 65 72 61 | 63 74 69 76 65 20 68 65 |* intera|ctive he|
|00000ce0| 6c 70 20 65 6e 74 72 79 | 20 2a 2f 0a 09 20 20 20 |lp entry| */.. |
|00000cf0| 20 62 72 65 61 6b 3b 09 | 09 2f 2a 20 69 67 6e 6f | break;.|./* igno|
|00000d00| 72 65 20 2a 2f 0a 09 7d | 0a 20 20 20 20 63 61 73 |re */..}|. cas|
|00000d10| 65 20 27 40 27 3a 7b 09 | 09 09 2f 2a 20 73 74 61 |e '@':{.|../* sta|
|00000d20| 72 74 2f 65 6e 64 20 74 | 61 62 6c 65 20 2a 2f 0a |rt/end t|able */.|
|00000d30| 09 20 20 20 20 62 72 65 | 61 6b 3b 09 09 2f 2a 20 |. bre|ak;../* |
|00000d40| 69 67 6e 6f 72 65 20 2a | 2f 0a 09 7d 0a 20 20 20 |ignore *|/..}. |
|00000d50| 20 63 61 73 65 20 27 23 | 27 3a 7b 09 09 09 2f 2a | case '#|':{.../*|
|00000d60| 20 6c 61 74 65 78 20 74 | 61 62 6c 65 20 65 6e 74 | latex t|able ent|
|00000d70| 72 79 20 2a 2f 0a 09 20 | 20 20 20 62 72 65 61 6b |ry */.. | break|
|00000d80| 3b 09 09 2f 2a 20 69 67 | 6e 6f 72 65 20 2a 2f 0a |;../* ig|nore */.|
|00000d90| 09 7d 0a 20 20 20 20 63 | 61 73 65 20 27 25 27 3a |.}. c|ase '%':|
|00000da0| 7b 09 09 09 2f 2a 20 74 | 72 6f 66 66 20 74 61 62 |{.../* t|roff tab|
|00000db0| 6c 65 20 65 6e 74 72 79 | 20 2a 2f 0a 09 20 20 20 |le entry| */.. |
|00000dc0| 20 62 72 65 61 6b 3b 09 | 09 2f 2a 20 69 67 6e 6f | break;.|./* igno|
|00000dd0| 72 65 20 2a 2f 0a 09 7d | 0a 20 20 20 20 63 61 73 |re */..}|. cas|
|00000de0| 65 20 27 5e 27 3a 7b 09 | 09 09 2f 2a 20 68 74 6d |e '^':{.|../* htm|
|00000df0| 6c 20 65 6e 74 72 79 20 | 2a 2f 0a 09 20 20 20 20 |l entry |*/.. |
|00000e00| 62 72 65 61 6b 3b 09 09 | 2f 2a 20 69 67 6e 6f 72 |break;..|/* ignor|
|00000e10| 65 20 2a 2f 0a 09 7d 0a | 20 20 20 20 63 61 73 65 |e */..}.| case|
|00000e20| 20 27 5c 6e 27 3a 09 09 | 09 2f 2a 20 65 6d 70 74 | '\n':..|./* empt|
|00000e30| 79 20 74 65 78 74 20 6c | 69 6e 65 20 2a 2f 0a 20 |y text l|ine */. |
|00000e40| 20 20 20 63 61 73 65 20 | 27 20 27 3a 7b 09 09 09 | case |' ':{...|
|00000e50| 2f 2a 20 6e 6f 72 6d 61 | 6c 20 74 65 78 74 20 6c |/* norma|l text l|
|00000e60| 69 6e 65 20 2a 2f 0a 09 | 20 20 20 20 28 76 6f 69 |ine */..| (voi|
|00000e70| 64 29 20 66 70 75 74 73 | 28 6c 69 6e 65 2c 20 62 |d) fputs|(line, b|
|00000e80| 29 3b 0a 09 20 20 20 20 | 62 72 65 61 6b 3b 0a 09 |);.. |break;..|
|00000e90| 7d 0a 20 20 20 20 64 65 | 66 61 75 6c 74 3a 7b 0a |}. de|fault:{.|
|00000ea0| 09 20 20 20 20 69 66 20 | 28 69 73 64 69 67 69 74 |. if |(isdigit|
|00000eb0| 28 28 69 6e 74 29 6c 69 | 6e 65 5b 30 5d 29 29 20 |((int)li|ne[0])) |
|00000ec0| 7b 20 2f 2a 20 73 74 61 | 72 74 20 6f 66 20 73 65 |{ /* sta|rt of se|
|00000ed0| 63 74 69 6f 6e 20 2a 2f | 0a 09 09 28 76 6f 69 64 |ction */|...(void|
|00000ee0| 29 20 66 70 75 74 73 28 | 6c 69 6e 65 2c 20 62 29 |) fputs(|line, b)|
|00000ef0| 3b 0a 09 20 20 20 20 7d | 20 65 6c 73 65 0a 09 09 |;.. }| else...|
|00000f00| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 20 |fprintf(|stderr, |
|00000f10| 22 75 6e 6b 6e 6f 77 6e | 20 63 6f 6e 74 72 6f 6c |"unknown| control|
|00000f20| 20 63 6f 64 65 20 27 25 | 63 27 20 69 6e 20 63 6f | code '%|c' in co|
|00000f30| 6c 75 6d 6e 20 31 2c 20 | 6c 69 6e 65 20 25 64 5c |lumn 1, |line %d\|
|00000f40| 6e 22 2c 0a 09 09 09 6c | 69 6e 65 5b 30 5d 2c 20 |n",....l|ine[0], |
|00000f50| 6c 69 6e 65 5f 63 6f 75 | 6e 74 29 3b 0a 09 20 20 |line_cou|nt);.. |
|00000f60| 20 20 62 72 65 61 6b 3b | 0a 09 7d 0a 20 20 20 20 | break;|..}. |
|00000f70| 7d 0a 7d 0a | |}.}. | |
+--------+-------------------------+-------------------------+--------+--------+